//合并store
import { defineStore } from 'pinia';
import { useHomeStore } from './modules/home';
import useMemberStore from './modules/member';
import { useCategoryStore } from './modules/category';
import { useCartStore } from './modules/cart';
import { useOrderStore } from './modules/order';
// 定义总Store，管理所有模块Store
const useStore = defineStore('main', {
  // state 存放模块 Store
  state: () => ({
    home: useHomeStore(),
    member: useMemberStore(),
    category: useCategoryStore(),
    cart: useCartStore(),
    order: useOrderStore(),
  }),
});

// 默认导出
export default useStore;
